-- Handler endsWithPunctuation returns TRUE if the given word
-- ends with a punctuation mark and returns FALSE otherwise.
on endsWithPunctuation whichWord
set lastChar = the last char of whichWord
if (lastChar = ".") or (lastChar = "?") or (lastChar = "!") or (lastChar = QUOTE) or (lastChar = ",") or (lastChar = ";") or (lastChar = ")") or (lastChar = "-") then
-- Handler beginsWithPunctuation returns TRUE if the given word
-- ends with a punctuation mark and returns FALSE otherwise.
on beginsWithPunctuation whichWord
set firstChar = char 1 of whichWord
if (firstChar = QUOTE) or (firstChar = "(") or (firstChar = "[") or (firstChar = "'") or (firstChar = "ô") or (firstChar = "æ") or (firstChar = "-") then